import RenderAuthorized from 'ant-design-pro/lib/Authorized';
const Authorized = RenderAuthorized();

const checkAuthority = key => {
  let resources = localStorage.getItem('resource');
  if (resources) {
    return JSON.stringify(resources).indexOf(key) !== -1;
  }
  return false;
};

export { checkAuthority, Authorized };
